The invention relates to a method for the model-based automatic optimization of an output quantity of a system that is dependent on a plurality of input quantities, for example an internal combustion engine, with maintenance of secondary conditions, whereby a theoretical value is determined for the output quantity and for the secondary conditions on the basis of a respective model function having the input quantities as variables, and in successive individual steps one of the input quantities is respectively modified inside a variation space having a dimension corresponding to the number of input quantities, whereby values, corresponding to the respective input quantities, for the output quantity and for the secondary conditions, are also determined directly at the system and are used for the correction of the model functions, until the model function has achieved its optimal value, fulfilling the secondary conditions, for the output quantity.
Known methods for the optimization of nonlinear systems in which a quantity to be optimized is dependent on a plurality of input quantities are very difficult and expensive for complex contexts. This is true in particular of online optimization methods, in which the corresponding calculations and measurements must take place extremely rapidly in order to acquire the changes in the system and in the models on which all cases are based, and in which the number of measurements required is to be kept low in order to save costs. In particular, this is the case for example for a function that depends on arbitrarily many input variables and that is to be minimized by modifying these variables, while at the same time arbitrarily many other functions that depend on the same variables should not exceed or, respectively, fall below a particular boundary value (optimization with maintenance of secondary conditions, extreme value tasks subject to secondary conditions, method of Lagrange,: constrained optimization). An example of a specific application can be found in the literature under xe2x80x9cModel Assisted Pattern Search.xe2x80x9d
Thus, methods are known in which the overall variation space is covered and measured in the form of a grid. With the aid of what is known as sequence variation, a finer grid measuring is started in the vicinity of the optimum found up to that point using model calculation and optimization. Following this sequence variation, an optimum is calculated on the basis of all previous measurements, and at this point an individual measurement is once again carried out. In addition, gradient search methods are also known in which, with the aid of the immediately preceding measurements, an attempt is made to find the direction of descent having the steepest gradient. The adjustment, whose step width standardly depends on the steepness of the gradient, is then carried out in the found direction. Given measurement values having a high degree of noise, which occur in particular given small step widths that are used at the beginning, the direction of descent can likewise vary arbitrarily. In general, therefore, the method yields the correct result in reproducible fashion only given very stable measurement values. Moreover, given a variable step width the number of measurements (which are very expensive) is relatively high.
It was therefore the object of the present invention to improve an optimization method of the type named above in such a way that it leads to an assured optimal value for the system more rapidly and with a lower expense.
This object is achieved according to the invention in that in a first stage the modification of the input quantities for the calculation and determination at the system takes place in an arbitrarily predetermined sequence, whereby for each input quantity an individual predetermined step size is not exceeded, and after the predetermined sequence has been processed the combination of input quantities that is closest to the optimal value is used as the starting point for the second stage. The model functions contain the influence of all input variables. For the target function (the function that is to be minimized) as well as for the secondary conditions there is thus respectively only one model that simultaneously takes into account all influencing quantities. At the beginning of the optimization, a particular region that is also somewhat larger is xe2x80x9cscannedxe2x80x9d according to a particular predefined pattern. On the basis of the values determined at the systemxe2x80x94and the model formation, which is thereby statistically betterxe2x80x94in a subsequent second stage the optimal value for the output quantity under consideration can then be found with a very low number of additional steps. The arbitrary combination of input quantities modified together or individually allows not only xe2x80x9corthogonalxe2x80x9d scanning of the space of the input quantities, but also acquires directions located therebetween.
According to a particularly simple variant, it is provided that the modification of the input quantities for the calculation and determination at the system in a first stage is carried out by a predetermined size at each step, whereby only one input quantity respectively changes, and the measurement and the compensation with the model function takes place separately for each modified input quantity, and, after modification of all input quantities, for the next step the system is set to the combination of input quantities that are closest to the optimal value for the output quantity.
According to an advantageous development of this variant of the method, it is provided that the input quantities are modified by the first predetermined size untilxe2x80x94while maintaining the secondary conditionsxe2x80x94there occurs no further improvement, in the direction of the optimal value, of the output value measured at the system and calculated on the basis of the model function. In this way a rapid approximation to the approximate combination of input quantities for the optimal value of the output quantity is possible.
In order, after closing in on the optimal value of the system on the coarse grid, to determine this value with a selectable degree of precision, in a second stage the modification of the input quantities for calculation and value determination at the system is carried out at each step by a second predetermined size that is smaller than that of the first stage; that is, using the same procedure as in the first stage, the evaluations are carried out at the system directly around the optimum, until the value of the model calculation agrees with the actual values with a selectable degree of precision.
Advantageously, only one input quantity is also thereby respectively modified if one of the surrounding points on the coarse grid cannot be set, or all input quantities are modified simultaneously if this is not the case, and the value determination is carried out at the system, and the compensation with the model function takes place separately for each modified input quantity, and, after modification of all input quantities, for the next step the system is set to the combination of input quantities that are closest to the optimal value for the output quantity. Ifxe2x80x94as is also the case in the first stagexe2x80x94the points surrounding the optimum on this grid are also measured, the risk of determining a merely local optimum can thereby be avoided.
According to a further feature of the invention, it can however also alternatively be provided that all possible combinations of input quantities in a particular region around the starting point of the second stage are set one after the other, and in this way the overall space of variables in the selected region is scanned. This feature likewise ensures a rapid determination of the actual optimal value with a selectable degree of precision. In addition, by scanning the overall variable space it is ensured that the global optimum has been determined.
So that the optimization also yields the actual optimal value with the highest degree of reliability, according to a further inventive feature, the steps of the second stage are repeated until the system is finally set to the variables that, while maintaining the secondary conditions, yield the optimal value for the output quantity in the selected region.
It is thereby advantageously provided that the modification of the input quantities for the second stage takes place in a plurality of steps, by an overall maximum of the amount that corresponds to the predetermined size of the first stage. This feature avoids redundant measurements and calculations for combinations of input values that were already taken into account in the rapid approximation.
If it is provided that the values from the system are compensated using model functions that are maximally of second order, a simple, inexpensive, and thereby very rapid calculation of the model functions is possible. Due to the fact that in practice the variation space is generally very limited, given arbitrary second-order functions it is seldom the case that a plurality of solutions occur, but by means of the possible limitation to exclusively convex quadratic models it can be ensured that the optimization task will have only one solution. Of course, however, in principle all types of functions, mathematical and even physical models can be taken into account, such as spline functions or neural networks. There is also for example the possibility of having the order of a polynomial model determined automatically with the aid of statistical methods.
A simpler start for the optimization results from the additional inventive feature that in the first step of the first stage the values from the system are compensated using a first-order model function. The first variation of each input quantity is thereby advantageously carried out in the direction towards the center of the variation space. By means of xe2x80x9cintelligent placementxe2x80x9d of the measurement points, i.e., distribution of the measurement points determined using statistical methods, the first measurement points can already be placed in such a way that the subsequent model calculation becomes still more precise, or, respectively, that a good model for the real system is obtained with as few measurements as possible.
Impermissible states of the system, and destructions therein in the case of real systems, can be prevented in that the system monitors during each modification of an input quantity, and stops and cancels the modification if predetermined boundary values for previously specified secondary conditions are exceeded, and stores in a database the combination of input quantities that was not realized due to this intervention, and blocks this combination for the further optimization. On the basis of hard limits, for example in a test bench system, it is not certain from the outset whether or not an arbitrary combination of the input quantities will destroy the motor or parts thereof. The adjustment of the variation parameters is therefore controlled with the aid of various rules in such a way that a destruction of the motor is reliably avoided. Since it is always the case that in each stage of the optimization method only a single variation parameter is adjusted in a new step, limit infringements can unambiguously be allocated to their causes.